package work724.work2;

public class Rabbit extends Animal{
  public Rabbit() {
  }

  public Rabbit(String name, String color, String type) {
    super(name, color, type);
  }

  @Override
  public String cry() {
    return "正在叽叽的叫";
  }

  @Override
  public String eat() {
    return "爱吃胡萝卜";
  }

  public void show(){
    super.setColor("黑色");
    super.setName("美人");
    super.setType("哺乳类");
    System.out.println("那只"+super.getColor()+"的，名字叫"+super.getName()+"的兔子"+cry());
    System.out.println("兔子是"+super.getType()+"，"+eat());
  }
}
